package com.open.capacity.sign.Config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.quartz.CronTriggerBean;
import org.springframework.scheduling.quartz.SchedulerFactoryBean;

/**
 * Created by 孙义朗 on 2017/11/9 0009.
 */
@Configuration
public class ScheduledConfiguration {
    @Bean
    public SchedulerFactoryBean schedulerFactory(CronTriggerBean[] cronTriggerBean) {
        SchedulerFactoryBean bean = new SchedulerFactoryBean();
        System.err.println(cronTriggerBean[0]);
        bean.setTriggers(cronTriggerBean);
        return bean;
    }
}
